package timing.ukulele.project.client;

import timing.ukulele.project.client.callback.SystemClientCallback;
import timing.ukulele.common.ResponseResult;
import timing.ukulele.common.portal.SystemData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

@FeignClient(value = "ukulele-portal", path = "portal", fallback = SystemClientCallback.class)
public interface SystemClient {
    @GetMapping("/api/system/getById/{id}")
    ResponseResult<SystemData> getById(@PathVariable("id") Long id);

    @GetMapping("/api/system/all")
    ResponseResult<List<SystemData>> all();
}
